package luogu;

import java.math.BigInteger;
import java.util.Scanner;

//斐波那契数列问题
public class Main1255 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        if (n==1){
            System.out.println(1);
        }else if (n==2){
            System.out.println(2);
        }else {
            BigInteger[] arr = new BigInteger[n + 1];
            arr[1] = BigInteger.ONE;
            arr [2] = BigInteger.valueOf(2);
            for (int i = 3; i <=n ; i++) {
                arr[i] = arr[i-1].add(arr[i-2]);
        }
            System.out.println(arr[n]);
        }
    }
}
